home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / GXMath.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  14.0 KB  |  590 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        GXMath.a
  3. ;
  4. ;    Contains:    QuickDraw GX math routine interfaces.
  5. ;
  6. ;    Version:    Technology:    Quickdraw GX 1.1
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__GXMATH__') = 'UNDEFINED' THEN
  18. __GXMATH__ SET 1
  19.  
  20.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  21.     include 'ConditionalMacros.a'
  22.     ENDIF
  23.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  24.     include 'MacTypes.a'
  25.     ENDIF
  26.     IF &TYPE('__FIXMATH__') = 'UNDEFINED' THEN
  27.     include 'FixMath.a'
  28.     ENDIF
  29.  
  30.  
  31. gxPoint                    RECORD 0
  32. x                         ds.l    1                ; offset: $0 (0)
  33. y                         ds.l    1                ; offset: $4 (4)
  34. sizeof                     EQU *                    ; size:   $8 (8)
  35.                         ENDR
  36. ; typedef unsigned short                 gxColorValue
  37.  
  38. gxPolar                    RECORD 0
  39. radius                     ds.l    1                ; offset: $0 (0)
  40. angle                     ds.l    1                ; offset: $4 (4)
  41. sizeof                     EQU *                    ; size:   $8 (8)
  42.                         ENDR
  43. gxMapping                RECORD 0
  44. map                         ds.l    3 * 3            ; offset: $0 (0)
  45. sizeof                     EQU *                    ; size:   $24 (36)
  46.                         ENDR
  47.  
  48.  
  49. gxColorValue1                    EQU        $0000FFFF            ; gxColorValue 1.0 
  50.  
  51. gxPositiveInfinity                EQU        $7FFFFFFF            ; for Fixed and Fract 
  52. gxNegativeInfinity                EQU        $80000000            ; for Fixed and Fract 
  53.  
  54. ;
  55. ; extern gxMapping *CopyToMapping(gxMapping *target, const gxMapping *source)
  56. ;
  57.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  58.         Macro
  59.         _CopyToMapping
  60.             move.w              #$0031,D0
  61.             dc.w                $A832
  62.         EndM
  63.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  64.         IMPORT_CFM_FUNCTION CopyToMapping
  65.     ENDIF
  66.  
  67. ;
  68. ; extern gxMapping *InvertMapping(gxMapping *target, const gxMapping *source)
  69. ;
  70.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  71.         Macro
  72.         _InvertMapping
  73.             move.w              #$0032,D0
  74.             dc.w                $A832
  75.         EndM
  76.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  77.         IMPORT_CFM_FUNCTION InvertMapping
  78.     ENDIF
  79.  
  80. ;
  81. ; extern gxMapping *MapMapping(gxMapping *target, const gxMapping *source)
  82. ;
  83.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  84.         Macro
  85.         _MapMapping
  86.             move.w              #$0033,D0
  87.             dc.w                $A832
  88.         EndM
  89.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  90.         IMPORT_CFM_FUNCTION MapMapping
  91.     ENDIF
  92.  
  93. ;
  94. ; extern gxMapping *MoveMapping(gxMapping *target, Fixed hOffset, Fixed vOffset)
  95. ;
  96.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  97.         Macro
  98.         _MoveMapping
  99.             move.w              #$0034,D0
  100.             dc.w                $A832
  101.         EndM
  102.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  103.         IMPORT_CFM_FUNCTION MoveMapping
  104.     ENDIF
  105.  
  106. ;
  107. ; extern gxMapping *MoveMappingTo(gxMapping *target, Fixed hPosition, Fixed vPosition)
  108. ;
  109.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  110.         Macro
  111.         _MoveMappingTo
  112.             move.w              #$0035,D0
  113.             dc.w                $A832
  114.         EndM
  115.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  116.         IMPORT_CFM_FUNCTION MoveMappingTo
  117.     ENDIF
  118.  
  119. ;
  120. ; extern gxMapping *NormalizeMapping(gxMapping *target)
  121. ;
  122.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  123.         Macro
  124.         _NormalizeMapping
  125.             move.w              #$0036,D0
  126.             dc.w                $A832
  127.         EndM
  128.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  129.         IMPORT_CFM_FUNCTION NormalizeMapping
  130.     ENDIF
  131.  
  132. ;
  133. ; extern gxMapping *RotateMapping(gxMapping *target, Fixed angle, Fixed xCenter, Fixed yCenter)
  134. ;
  135.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  136.         Macro
  137.         _RotateMapping
  138.             move.w              #$0037,D0
  139.             dc.w                $A832
  140.         EndM
  141.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  142.         IMPORT_CFM_FUNCTION RotateMapping
  143.     ENDIF
  144.  
  145. ;
  146. ; extern gxMapping *ScaleMapping(gxMapping *target, Fixed hFactor, Fixed vFactor, Fixed xCenter, Fixed yCenter)
  147. ;
  148.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  149.         Macro
  150.         _ScaleMapping
  151.             move.w              #$0038,D0
  152.             dc.w                $A832
  153.         EndM
  154.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  155.         IMPORT_CFM_FUNCTION ScaleMapping
  156.     ENDIF
  157.  
  158. ;
  159. ; extern gxMapping *ResetMapping(gxMapping *target)
  160. ;
  161.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  162.         Macro
  163.         _ResetMapping
  164.             move.w              #$0039,D0
  165.             dc.w                $A832
  166.         EndM
  167.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  168.         IMPORT_CFM_FUNCTION ResetMapping
  169.     ENDIF
  170.  
  171. ;
  172. ; extern gxMapping *SkewMapping(gxMapping *target, Fixed skewX, Fixed skewY, Fixed xCenter, Fixed yCenter)
  173. ;
  174.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  175.         Macro
  176.         _SkewMapping
  177.             move.w              #$003A,D0
  178.             dc.w                $A832
  179.         EndM
  180.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  181.         IMPORT_CFM_FUNCTION SkewMapping
  182.     ENDIF
  183.  
  184. ;
  185. ; extern void MapPoints(const gxMapping *source, long count, gxPoint vector[2147483647])
  186. ;
  187.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  188.         Macro
  189.         _MapPoints
  190.             move.w              #$003B,D0
  191.             dc.w                $A832
  192.         EndM
  193.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  194.         IMPORT_CFM_FUNCTION MapPoints
  195.     ENDIF
  196.  
  197. ;
  198. ; extern short FirstBit(unsigned long x)
  199. ;
  200.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  201.         Macro
  202.         _FirstBit
  203.             move.w              #$003C,D0
  204.             dc.w                $A832
  205.         EndM
  206.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  207.         IMPORT_CFM_FUNCTION FirstBit
  208.     ENDIF
  209.  
  210. ;
  211. ; extern short WideScale(const wide *source)
  212. ;
  213.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  214.         Macro
  215.         _WideScale
  216.             move.w              #$003D,D0
  217.             dc.w                $A832
  218.         EndM
  219.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  220.         IMPORT_CFM_FUNCTION WideScale
  221.     ENDIF
  222.  
  223. ;
  224. ; extern short LinearRoot(Fixed first, Fixed last, Fract t[2147483647])
  225. ;
  226.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  227.         Macro
  228.         _LinearRoot
  229.             move.w              #$003E,D0
  230.             dc.w                $A832
  231.         EndM
  232.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  233.         IMPORT_CFM_FUNCTION LinearRoot
  234.     ENDIF
  235.  
  236. ;
  237. ; extern short QuadraticRoot(Fixed first, Fixed control, Fixed last, Fract t[2147483647])
  238. ;
  239.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  240.         Macro
  241.         _QuadraticRoot
  242.             move.w              #$003F,D0
  243.             dc.w                $A832
  244.         EndM
  245.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  246.         IMPORT_CFM_FUNCTION QuadraticRoot
  247.     ENDIF
  248.  
  249. ;
  250. ; extern gxPoint *PolarToPoint(const gxPolar *ra, gxPoint *xy)
  251. ;
  252.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  253.         Macro
  254.         _PolarToPoint
  255.             move.w              #$0040,D0
  256.             dc.w                $A832
  257.         EndM
  258.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  259.         IMPORT_CFM_FUNCTION PolarToPoint
  260.     ENDIF
  261.  
  262. ;
  263. ; extern gxPolar *PointToPolar(const gxPoint *xy, gxPolar *ra)
  264. ;
  265.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  266.         Macro
  267.         _PointToPolar
  268.             move.w              #$0041,D0
  269.             dc.w                $A832
  270.         EndM
  271.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  272.         IMPORT_CFM_FUNCTION PointToPolar
  273.     ENDIF
  274.  
  275. ;
  276. ; extern Fract FractCubeRoot(Fract source)
  277. ;
  278.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  279.         Macro
  280.         _FractCubeRoot
  281.             move.w              #$0042,D0
  282.             dc.w                $A832
  283.         EndM
  284.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  285.         IMPORT_CFM_FUNCTION FractCubeRoot
  286.     ENDIF
  287.  
  288. ;
  289. ; extern Fract FractDivide(Fract dividend, Fract divisor)
  290. ;
  291.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  292.         Macro
  293.         _FractDivide
  294.             move.w              #$0043,D0
  295.             dc.w                $A832
  296.         EndM
  297.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  298.         IMPORT_CFM_FUNCTION FractDivide
  299.     ENDIF
  300.  
  301. ;
  302. ; extern Fract FractMultiply(Fract multiplicand, Fract multiplier)
  303. ;
  304.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  305.         Macro
  306.         _FractMultiply
  307.             move.w              #$0044,D0
  308.             dc.w                $A832
  309.         EndM
  310.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  311.         IMPORT_CFM_FUNCTION FractMultiply
  312.     ENDIF
  313.  
  314. ;
  315. ; extern Fract FractSineCosine(Fixed degrees, Fract *cosine)
  316. ;
  317.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  318.         Macro
  319.         _FractSineCosine
  320.             move.w              #$0045,D0
  321.             dc.w                $A832
  322.         EndM
  323.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  324.         IMPORT_CFM_FUNCTION FractSineCosine
  325.     ENDIF
  326.  
  327. ;
  328. ; extern Fract FractSquareRoot(Fract source)
  329. ;
  330.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  331.         Macro
  332.         _FractSquareRoot
  333.             move.w              #$0046,D0
  334.             dc.w                $A832
  335.         EndM
  336.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  337.         IMPORT_CFM_FUNCTION FractSquareRoot
  338.     ENDIF
  339.  
  340. ;
  341. ; extern Fixed FixedDivide(Fixed dividend, Fixed divisor)
  342. ;
  343.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  344.         Macro
  345.         _FixedDivide
  346.             move.w              #$0047,D0
  347.             dc.w                $A832
  348.         EndM
  349.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  350.         IMPORT_CFM_FUNCTION FixedDivide
  351.     ENDIF
  352.  
  353. ;
  354. ; extern Fixed FixedMultiply(Fixed multiplicand, Fixed multiplier)
  355. ;
  356.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  357.         Macro
  358.         _FixedMultiply
  359.             move.w              #$0048,D0
  360.             dc.w                $A832
  361.         EndM
  362.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  363.         IMPORT_CFM_FUNCTION FixedMultiply
  364.     ENDIF
  365.  
  366. ;  This next call is (source * multiplier / divisor) -- it avoids underflow, overflow by using wides 
  367. ;
  368. ; extern long MultiplyDivide(long source, long multiplier, long divisor)
  369. ;
  370.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  371.         Macro
  372.         _MultiplyDivide
  373.             move.w              #$0049,D0
  374.             dc.w                $A832
  375.         EndM
  376.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  377.         IMPORT_CFM_FUNCTION MultiplyDivide
  378.     ENDIF
  379.  
  380. ;
  381. ; extern unsigned long Magnitude(long deltaX, long deltaY)
  382. ;
  383.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  384.         Macro
  385.         _Magnitude
  386.             move.w              #$004A,D0
  387.             dc.w                $A832
  388.         EndM
  389.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  390.         IMPORT_CFM_FUNCTION Magnitude
  391.     ENDIF
  392.  
  393. ;
  394. ; extern long VectorMultiplyDivide(long count, const long *vector1, long step1, const long *vector2, long step2, long divisor)
  395. ;
  396.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  397.         Macro
  398.         _VectorMultiplyDivide
  399.             move.w              #$004B,D0
  400.             dc.w                $A832
  401.         EndM
  402.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  403.         IMPORT_CFM_FUNCTION VectorMultiplyDivide
  404.     ENDIF
  405.  
  406.  
  407.  
  408.  
  409. ;  wide operations are defined within FixMath.h only for PowerPC 
  410.     IF ¬ TARGET_CPU_PPC THEN
  411. ;
  412. ; extern wide *WideAdd(wide *target, const wide *source)
  413. ;
  414.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  415.         Macro
  416.         _WideAdd
  417.             move.w              #$004C,D0
  418.             dc.w                $A832
  419.         EndM
  420.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  421.         IMPORT_CFM_FUNCTION WideAdd
  422.     ENDIF
  423.  
  424. ;
  425. ; extern short WideCompare(const wide *target, const wide *source)
  426. ;
  427.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  428.         Macro
  429.         _WideCompare
  430.             move.w              #$004D,D0
  431.             dc.w                $A832
  432.         EndM
  433.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  434.         IMPORT_CFM_FUNCTION WideCompare
  435.     ENDIF
  436.  
  437. ;
  438. ; extern wide *WideNegate(wide *target)
  439. ;
  440.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  441.         Macro
  442.         _WideNegate
  443.             move.w              #$004E,D0
  444.             dc.w                $A832
  445.         EndM
  446.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  447.         IMPORT_CFM_FUNCTION WideNegate
  448.     ENDIF
  449.  
  450. ;
  451. ; extern wide *WideShift(wide *target, long shift)
  452. ;
  453.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  454.         Macro
  455.         _WideShift
  456.             move.w              #$004F,D0
  457.             dc.w                $A832
  458.         EndM
  459.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  460.         IMPORT_CFM_FUNCTION WideShift
  461.     ENDIF
  462.  
  463. ;
  464. ; extern unsigned long WideSquareRoot(const wide *source)
  465. ;
  466.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  467.         Macro
  468.         _WideSquareRoot
  469.             move.w              #$0050,D0
  470.             dc.w                $A832
  471.         EndM
  472.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  473.         IMPORT_CFM_FUNCTION WideSquareRoot
  474.     ENDIF
  475.  
  476. ;
  477. ; extern wide *WideSubtract(wide *target, const wide *source)
  478. ;
  479.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  480.         Macro
  481.         _WideSubtract
  482.             move.w              #$0051,D0
  483.             dc.w                $A832
  484.         EndM
  485.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  486.         IMPORT_CFM_FUNCTION WideSubtract
  487.     ENDIF
  488.  
  489. ;
  490. ; extern wide *WideMultiply(long multiplicand, long multiplier, wide *target)
  491. ;
  492.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  493.         Macro
  494.         _WideMultiply
  495.             move.w              #$0052,D0
  496.             dc.w                $A832
  497.         EndM
  498.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  499.         IMPORT_CFM_FUNCTION WideMultiply
  500.     ENDIF
  501.  
  502. ;  returns the quotient 
  503. ;
  504. ; extern long WideDivide(const wide *dividend, long divisor, long *remainder)
  505. ;
  506.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  507.         Macro
  508.         _WideDivide
  509.             move.w              #$0053,D0
  510.             dc.w                $A832
  511.         EndM
  512.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  513.         IMPORT_CFM_FUNCTION WideDivide
  514.     ENDIF
  515.  
  516. ;  quotient replaces dividend 
  517. ;
  518. ; extern wide *WideWideDivide(wide *dividend, long divisor, long *remainder)
  519. ;
  520.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  521.         Macro
  522.         _WideWideDivide
  523.             move.w              #$0055,D0
  524.             dc.w                $A832
  525.         EndM
  526.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  527.         IMPORT_CFM_FUNCTION WideWideDivide
  528.     ENDIF
  529.  
  530.     ENDIF
  531.  
  532.  
  533. ;
  534. ; extern wide *VectorMultiply(long count, const long *vector1, long step1, const long *vector2, long step2, wide *dot)
  535. ;
  536.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  537.         Macro
  538.         _VectorMultiply
  539.             move.w              #$0054,D0
  540.             dc.w                $A832
  541.         EndM
  542.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  543.         IMPORT_CFM_FUNCTION VectorMultiply
  544.     ENDIF
  545.  
  546. ;
  547. ; extern unsigned long RandomBits(long count, long focus)
  548. ;
  549.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  550.         Macro
  551.         _RandomBits
  552.             move.w              #$0056,D0
  553.             dc.w                $A832
  554.         EndM
  555.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  556.         IMPORT_CFM_FUNCTION RandomBits
  557.     ENDIF
  558.  
  559. ;
  560. ; extern void SetRandomSeed(const wide *seed)
  561. ;
  562.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  563.         Macro
  564.         _SetRandomSeed
  565.             move.w              #$0057,D0
  566.             dc.w                $A832
  567.         EndM
  568.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  569.         IMPORT_CFM_FUNCTION SetRandomSeed
  570.     ENDIF
  571.  
  572. ;
  573. ; extern wide *GetRandomSeed(wide *seed)
  574. ;
  575.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  576.         Macro
  577.         _GetRandomSeed
  578.             move.w              #$0058,D0
  579.             dc.w                $A832
  580.         EndM
  581.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  582.         IMPORT_CFM_FUNCTION GetRandomSeed
  583.     ENDIF
  584.  
  585.  
  586.  
  587.  
  588.     ENDIF ; __GXMATH__ 
  589.  
  590.